﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.Composition;
using Microsoft.ComponentModel.Composition.Extensions.Web;

namespace Steve.UI.Site.Controllers
{
    [SiteMasterData]
    [Export(typeof(IController))]
    [ExportMetadata("Name", "Home")]
    [ExportMetadata("Mode", WebScopeMode.Request)]
    [PartCreationPolicy(CreationPolicy.NonShared)]
    public sealed class HomeController : Controller
    {
        [Import]
        public MetaRepository Data { get; set; }

        public ActionResult Index()
        {
            var snapshot = Data.GetSnapshot();

            return View(snapshot);
        }

    }
}
